package com.example.judge.controller;

import com.example.common.core.controller.BaseController;
import com.example.common.core.domain.Result;
import com.example.common.core.enums.ResultCode;
import com.example.domain.dto.JudgeSubmitDTO;
import com.example.domain.vo.UserQuestionResultVO;
import com.example.judge.service.JudgeService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 23050
 * @version 1.0
 * @description: TODO
 * @date 2025/5/2 18:42
 */
@RestController
@RequestMapping("/judge")
public class JudgeController extends BaseController {


    @Resource
    private JudgeService judgeService;

    @PostMapping("/judge/doJudgeJavaCode")
    Result<UserQuestionResultVO> doJudgeJavaCode(@RequestBody JudgeSubmitDTO judgeSubmitDTO){

        return new Result(ResultCode.SUCCESS.getCode(),"成功",judgeService.doJudgeJavaCode(judgeSubmitDTO));
    }




}
